package com.xj.api.bussiness.deviceInformation.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.xj.api.bussiness.deviceInformation.service.ITbDeviceInformationService;
import com.xj.common.bussiness.deviceInformation.entity.DeviceInfoMould;
import com.xj.common.bussiness.deviceInformation.entity.DeviceInfoParamMould;
import com.xj.common.bussiness.deviceInformation.entity.TbDeviceInformation;
import com.xj.common.bussiness.deviceInformation.mapper.TbDeviceInformationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Hmemb
 * @since 2018-02-27
 */
@Service
public class TbDeviceInformationServiceImpl extends ServiceImpl<TbDeviceInformationMapper, TbDeviceInformation> implements ITbDeviceInformationService {

    @Autowired
    private TbDeviceInformationMapper tbDeviceInformationMapper;
    @Override
    public List<TbDeviceInformation> getDeviceInformationByCondition(TbDeviceInformation bean) {
        return tbDeviceInformationMapper.getDeviceInformationByCondition(bean);
    }

    /**
     * 根据相关的字段分页查询设备信息和照片
     * @param page
     * @param deviceInfoParamMould
     * @return
     */
    @Override
    public Page<DeviceInfoMould> selectDeviceInfo(Page<DeviceInfoMould> page, DeviceInfoParamMould deviceInfoParamMould) {
        page.setRecords( tbDeviceInformationMapper.selectDeviceInfo(page,deviceInfoParamMould));
        return page;
    }
}
